package xiaolong.lian.service;

import xiaolong.lian.exception.CustomException;

public interface UserService {

    /**
     * 发送验证码
     * @param tel
     * @return 所发送的验证码
     */
    String sendAuthCode(String tel) throws CustomException;

    /**
     *
     * @param tel
     * @param password
     * @param codeSent
     * @param codePost
     * @return token
     */
    String register(String tel, String password, String codeSent, String codePost) throws CustomException;

    /**
     * 登录
     * @param tel
     * @param password
     * @return token
     */
    String login(String tel, String password) throws CustomException;

    /**
     *
     * @param tel
     * @param newPassword
     * @param codeSent
     * @param codePost
     * @return token
     */
    String resetPassword(String tel, String newPassword, String codeSent, String codePost) throws CustomException;
}
